import request from '@/utils/request'

// @Tags api
// @Summary 获取模板
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body modelInterface.PageInfo true "获取模板"
// @Success 200 {string} json "{"code":0,"data":{"UserName": "string","Account": "string","OperationType": "string","CreateTime": "string"},"msg":"获取成功"}"
// @Router /api/system/user/login [Get]
export const getTemplateList = () => {
  return request({
    url: '/api/template/list',
    method: 'Get'
  })
}

// @Tags api
// @Summary 添加模板
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body modelInterface.PageInfo true "添加模板"
// @Success 200 {string} json "{"code":0,"data":{"UserName": "string","Account": "string","OperationType": "string","CreateTime": "string"},"msg":"获取成功"}"
// @Router /api/system/user/login [Post]
export const addTemplate = (data) => {
  return request({
    url: '/api/template/add',
    method: 'Post',
    data
  })
}

export const getTemplateDetail = (orderId) => {
  return request({
    url: `/api/template/detail/${orderId}`,
    method: 'Get'
  })
}

export const setproductLabs = (data) => {
  return request({
    url: '/api/template/productLabs/set',
    method: 'Post',
    data
  })
}
export const setserviceLabs = (data) => {
  return request({
    url: '/api/template/serviceLabs/set',
    method: 'Post',
    data
  })
}
export const setcommonQas = (data) => {
  return request({
    url: '/api/template/commonQas/set',
    method: 'Post',
    data
  })
}
export const setleaseExplain = (data) => {
  return request({
    url: '/api/template/leaseExplain/set',
    method: 'Post',
    data
  })
}
export const setafterSales = (data) => {
  return request({
    url: '/api/template/afterSales/set',
    method: 'Post',
    data
  })
}